package odgs;

import java.io.Serializable;

import odgs.transaction.ContentsAddTransaction;

public class SelectGridNode implements Serializable
{
	private ContentsAddTransaction transaction;
	private String	ip;
	private long start;
	private long end;
	private String id;
	private int	contentsUID;

	public SelectGridNode(String id, ContentsAddTransaction trans, String ip, long start, long end)
	{
		this.id = id;
		this.transaction = trans;
		this.ip = ip;
		this.start = start;
		this.end = end;
	}

	public long getEnd()
	{
		return end;
	}

	public void setEnd(long end)
	{
		this.end = end;
	}

	public String getIp()
	{
		return ip;
	}

	public void setIp(String ip)
	{
		this.ip = ip;
	}

	public ContentsAddTransaction getTransaction()
	{
		return transaction;
	}

	public void setTransaction(ContentsAddTransaction trans)
	{
		this.transaction = trans;
	}

	public long getStart()
	{
		return start;
	}

	public void setStart(long start)
	{
		this.start = start;
	}

	public String getID()
	{
		return id;
	}

	public String getSaveFileInfoString() {
		return transaction.getSource().getUid() + "_" + start + "_" + end + "." + transaction.getSource().getType();
	}

	public String getFileLocalPath() {
		return transaction.getLocalPath();
	}

	public long getAddRequestId()
	{
		return transaction.getRequestId();
	}

	public void setContentsUID(int pk)
	{
		contentsUID = pk;
	}
	
	public int getContentsUID()
	{
		return contentsUID;
	}
}